<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="img/favicon.png">

    <title>南牧物联网云平台</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
	<link href="__PUBLIC__/assets/morris.js-0.4.3/morris.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="__PUBLIC__/css/owl.carousel.css" type="text/css">

	<!-- iCheck for checkboxes and radio inputs -->
    <link rel="stylesheet" href="__PUBLIC__/plugins/iCheck/all.css">
	
	<link href="__PUBLIC__/plugins/touchspin/jquery.bootstrap-touchspin.min.css" rel="stylesheet">
	
      <!--right slidebar-->
      <link href="__PUBLIC__/css/slidebars.css" rel="stylesheet">

    <!-- Custom styles for this template -->

    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />
	
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/floatmenu/css/menu.css">

  </head>

  <body >
		<div class="main_nav_bottom">
			<nav class="navbar navbar-inverse navbar-fixed-top">
				<div class="container" align="center">
					<ul class="nav nav-tabs nav-tabs-justified">
					   
							<button onclick="readNM410clock();" type="button" class="btn btn-primary">读取时间</button>
							<button onclick="writeNM410clock();" type="button" class="btn btn-success">设置时间</button>
							<button onclick="readNM410para();" type="button" class="btn btn-primary">读取参数</button>
							<button onclick="writeNM410para();" type="button" class="btn btn-success">设置参数</button>
							<button onclick="save410();" type="button" class="btn btn-success">保存</button>
						
					</ul>
				</div>
			</nav>
		</div>
			

		<div class="mybar">	  
		
		<div class="row">
			  <div class="col-lg-12">
				  <!--breadcrumbs start -->
				  <ul class="breadcrumb">
					  <li><a href="#" onclick="parent.document.getElementById('id-a-Index').click();parent.document.getElementById('id-a-Index-home').click();"><i class="fa fa-dashboard"></i> 养殖场</a></li>
					  <li><a href="#" onclick="parent.document.getElementById('id-a-Setting-home').click();"></i>设备管理</a></li>
					  <li class="active">环控器NM410设备管理</li>
				  </ul>
				  <!--breadcrumbs end -->
				  
			  </div>
		</div>
								  
		<div class="row">
			<div class="col-lg-12">
				<form  id="id-form-system">
					<section class="panel" id="sec_mh">
					  <header class="panel-heading">
						  数量统计
					  </header>
					  <div class="panel-body">
							<div class="row">
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">当前日龄</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" readonly class="form-control " name="mh_Day" placeholder="" value="{$nm410Model['mh_day']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">每日合计</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" readonly class="form-control " name="mh_DeadTotal" placeholder="" value="{$nm410Model['mh_deadtotal']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  
							</div>
							  
							<div class="row">
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">初始数量</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" readonly class="form-control " name="mh_InitNum" placeholder="" value="{$nm410Model['mh_initnum']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">存栏量</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" readonly class="form-control " name="mh_RevNum" placeholder="" value="{$nm410Model['mh_revnum']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>

							  </div>

					  </div>
					</section>
					
					<section class="panel" id="sec_net">
					  <header class="panel-heading">
						  通讯设置       
					  </header>
					  <div class="panel-body">
							<div class="row">
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">控制器地址</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="code" placeholder="" value="{$nm410Model['code']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">服务器IP地址</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="serverIP" placeholder="" value="{$nm410Model['serverip']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">服务器端口</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="serverPort" placeholder="" value="{$nm410Model['serverport']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  
							</div>
							  
							<div class="row">
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">本地IP</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="localIP" placeholder="" value="{$nm410Model['localip']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">网关</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="gateway" placeholder="" value="{$nm410Model['gateway']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>
								  
								  <div >
									  <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">子网掩码</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <input type="text" class="form-control" name="netmask" placeholder="" value="{$nm410Model['netmask']}">
										  <p class="help-block"></p>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>

							  </div>
					  </div>
					</section>
					
					<section class="panel" id="sec_mode">
					  <header class="panel-heading">
						  设置模式       
					  </header>
					  <div class="panel-body">
							  
							<div class="row">
								  <div >
									  <label for="input2" class="col-lg-2 col-sm-2 control-label">温度控制模式</label>
									  <div class="col-lg-2 col-md-2 col-sm-2">
										  <!-- <input type="text" class="form-control" name="sys_Mode" placeholder="" value="{$nm410Model['sys_mode']}">
										  <p class="help-block"></p> -->
										  <select class="form-control" name='sys_Mode' value="{$nm410Model['sys_mode']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_mode'] eq '0'">selected = "selected"</if> >自设模式</option>
											<option  value="1" <if condition="$nm410Model['sys_mode'] eq '1'">selected = "selected"</if> >曲线模式</option>
										  </select>
									  </div>
									  <div class="col-lg-1 col-md-1 col-sm-1"></div>
								  </div>

							  </div>
					  </div>
					</section>
					
					<section class="panel" id="sec_channel">
					  <header class="panel-heading">
						  隧道设置       
					  </header>
					  <div class="panel-body">
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">隧道起始温度</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="tunnel_Temp" placeholder="" value="{$nm410Model['tunnel_temp']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">隧道开始级别</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Level_StartChannel" placeholder="" value="{$nm410Model['sys_level_startchannel']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">隧道最短时间</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Time_Channel" placeholder="" value="{$nm410Model['sys_time_channel']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
					  </div>
					</section>
					
					<section class="panel" id="sec_sensor">
					  <header class="panel-heading">
						  传感器设置     
					  </header>
						<div class="panel-body">
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">最小通风传感器</label>
									
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Wind1" placeholder="" value="{$nm410Model['sensor_Wind1']}">
									
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Wind2" placeholder="" value="{$nm410Model['sensor_Wind2']}">
										
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Wind3" placeholder="" value="{$nm410Model['sensor_Wind3']}">
										
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Wind4" placeholder="" value="{$nm410Model['sensor_Wind4']}">
										
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-sm-2 control-label">隧道通风传感器</label>
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Channel1" placeholder="" value="{$nm410Model['sensor_Channel1']}">
										
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Channel2" placeholder="" value="{$nm410Model['sensor_Channel2']}">
										
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Channel3" placeholder="" value="{$nm410Model['sensor_Channel3']}">
										
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Channel4" placeholder="" value="{$nm410Model['sensor_Channel4']}">
										
										
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-sm-2 control-label">制冷传感器</label>
									
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Cool1" placeholder="" value="{$nm410Model['sensor_Cool1']}">
									
								
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Cool2" placeholder="" value="{$nm410Model['sensor_Cool2']}">
									
								
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Cool3" placeholder="" value="{$nm410Model['sensor_Cool3']}">
									
								
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Cool4" placeholder="" value="{$nm410Model['sensor_Cool4']}">
										
								</div>
							</div>
							
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-sm-2 control-label">加热使用传感器1</label>
									
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Heat11" placeholder="" value="{$nm410Model['sensor_Heat11']}">
									
								
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Heat12" placeholder="" value="{$nm410Model['sensor_Heat12']}">
									
								
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Heat13" placeholder="" value="{$nm410Model['sensor_Heat13']}">
									
								
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Heat14" placeholder="" value="{$nm410Model['sensor_Heat14']}">
										
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-sm-2 control-label">加热使用传感器2</label>
									
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Heat21" placeholder="" value="{$nm410Model['sensor_Heat21']}">
									
								
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Heat22" placeholder="" value="{$nm410Model['sensor_Heat22']}">
									
								
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Heat23" placeholder="" value="{$nm410Model['sensor_Heat23']}">
									
								
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Heat24" placeholder="" value="{$nm410Model['sensor_Heat24']}">
										
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-2 col-sm-2 control-label">加热使用传感器3</label>
									
									<label for="input2">1</label>
									<input type="checkbox" class="form-control" name="sensor_Heat31" placeholder="" value="{$nm410Model['sensor_Heat31']}">
									
								
									<label for="input2">2</label>
									<input type="checkbox" class="form-control" name="sensor_Heat32" placeholder="" value="{$nm410Model['sensor_Heat32']}">
									
								
									<label for="input2">3</label>
									<input type="checkbox" class="form-control" name="sensor_Heat33" placeholder="" value="{$nm410Model['sensor_Heat33']}">
									
								
									<label for="input2">4</label>
									<input type="checkbox" class="form-control" name="sensor_Heat34" placeholder="" value="{$nm410Model['sensor_Heat34']}">
										
								</div>
							</div>
						</div>
					</section>
					
					<section class="panel" id="sec_sys">
					  <header class="panel-heading">
						  系统变量       
					  </header>
						<div class="panel-body">
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">通风升级延迟(分)</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Delay_FanUp" placeholder="" value="{$nm410Model['sys_delay_fanup']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">通风降级延迟（分）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Delay_FanDown" placeholder="" value="{$nm410Model['sys_delay_fandown']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">侧风窗开时间(秒)</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_ON1" placeholder="" value="{$nm410Model['sys_Time_Pos_ON1']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">侧风窗关时间（秒）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_OFF1" placeholder="" value="{$nm410Model['sys_Time_Pos_OFF1']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">天花窗开时间（秒）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_ON2" placeholder="" value="{$nm410Model['sys_Time_Pos_ON2']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">天花窗关时间(秒)</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_OFF2" placeholder="" value="{$nm410Model['sys_Time_Pos_OFF2']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">滑帘开时间(秒)</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_ON3" placeholder="" value="{$nm410Model['sys_Time_Pos_ON3']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">滑帘关时间（秒）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_OFF3" placeholder="" value="{$nm410Model['sys_Time_Pos_OFF3']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">卷帘开时间（秒）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_ON4" placeholder="" value="{$nm410Model['sys_Time_Pos_ON4']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">卷帘关时间（秒）</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin3" name="sys_Time_Pos_OFF4" placeholder="" value="{$nm410Model['sys_Time_Pos_OFF4']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								

							</div>

							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温度探头1故障是否报警</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_Alarm_TempSF1" placeholder="" value="{$nm410Model['sys_alarm_tempsf1']}"> -->
										<select class="form-control" name='sys_Alarm_TempSF1' value="{$nm410Model['sys_alarm_tempsf1']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_alarm_tempsf1'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_alarm_tempsf1'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温度探头2故障是否报警</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_Alarm_TempSF2" placeholder="" value="{$nm410Model['sys_alarm_tempsf2']}"> -->
										<select class="form-control" name='sys_Alarm_TempSF2' value="{$nm410Model['sys_alarm_tempsf2']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_alarm_tempsf2'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_alarm_tempsf2'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温度探头3故障是否报警</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_Alarm_TempSF3" placeholder="" value="{$nm410Model['sys_alarm_tempsf3']}"> -->
										<select class="form-control" name='sys_Alarm_TempSF3' value="{$nm410Model['sys_alarm_tempsf3']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_alarm_tempsf3'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_alarm_tempsf3'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温度探头4故障是否报警</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_Alarm_TempSF4" placeholder="" value="{$nm820Model['sys_alarm_tempsf4']}"> -->
										<select class="form-control" name='sys_Alarm_TempSF4' value="{$nm410Model['sys_alarm_tempsf4']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_alarm_tempsf4'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_alarm_tempsf4'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">湿度探头1故障是否报警</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_Alarm_HumiSF1" placeholder="" value="{$nm820Model['sys_alarm_humisf1']}"> -->
										<select class="form-control" name='sys_Alarm_HumiSF1' value="{$nm410Model['sys_alarm_humisf1']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_alarm_humisf1'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_alarm_humisf1'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">是否使用湿度探头</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<!-- <input type="text" class="form-control" name="sys_EnHumi" placeholder="" value="{$nm410Model['sys_EnHumi']}"> -->
										<select class="form-control" name='sys_EnHumi' value="{$nm410Model['sys_EnHumi']}" style="width: 100%;">
											<option  value="0" <if condition="$nm410Model['sys_EnHumi'] eq '0'">selected = "selected"</if> >否</option>
											<option  value="1" <if condition="$nm410Model['sys_EnHumi'] eq '1'">selected = "selected"</if> >是</option>
										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">报警最高温度</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Alarm_Temp_Max" placeholder="" value="{$nm410Model['sys_alarm_temp_max']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">报警最低温度</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Alarm_Temp_Min" placeholder="" value="{$nm410Model['sys_alarm_temp_min']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							
							<div class="row">
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">报警最高湿度</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Alarm_Humi_Max" placeholder="" value="{$nm410Model['sys_alarm_humi_max']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
								<div >
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">报警最低湿度</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<input type="text" class="form-control touchspin1" name="sys_Alarm_Humi_Min" placeholder="" value="{$nm410Model['sys_alarm_humi_min']}">
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>
								</div>
							</div>
							

							<foreach name="sys_Relay_array" item="vo" key="k">
							<if condition="$k%3 eq 0">
								<div class="row">
							</if>
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">继电器{$k+1}</label>
									<div class="col-lg-2 col-md-2 col-sm-2">
										<select class="form-control input-sm" name='sys_Relay{$k+1}' value="{$vo}" >
											<option  value="0" <if condition="$vo eq '0'">selected = "selected"</if> >手动</option>
											<option  value="1" <if condition="$vo eq '1'">selected = "selected"</if> >风机1</option>
											<option  value="2" <if condition="$vo eq '2'">selected = "selected"</if> >风机2</option>
											<option  value="3" <if condition="$vo eq '3'">selected = "selected"</if> >风机3</option>
											<option  value="4" <if condition="$vo eq '4'">selected = "selected"</if> >风机4</option>
											<option  value="5" <if condition="$vo eq '5'">selected = "selected"</if> >风机5</option>
											<option  value="6" <if condition="$vo eq '6'">selected = "selected"</if> >风机6</option>
											<option  value="7" <if condition="$vo eq '7'">selected = "selected"</if> >风机7</option>
											<option  value="8" <if condition="$vo eq '8'">selected = "selected"</if> >风机8</option>
											<option  value="9" <if condition="$vo eq '9'">selected = "selected"</if> >加热1</option>
											<option  value="10" <if condition="$vo eq '10'">selected = "selected"</if> >加热2</option>
											<option  value="11" <if condition="$vo eq '11'">selected = "selected"</if> >加热3</option>
											<option  value="12" <if condition="$vo eq '12'">selected = "selected"</if> >冷却水泵</option>
											<option  value="13" <if condition="$vo eq '13'">selected = "selected"</if> >侧风窗开</option>
											<option  value="14" <if condition="$vo eq '14'">selected = "selected"</if> >侧风窗关</option>
											<option  value="15" <if condition="$vo eq '15'">selected = "selected"</if> >天花窗开</option>
											<option  value="16" <if condition="$vo eq '16'">selected = "selected"</if> >天花窗关</option>
											<option  value="17" <if condition="$vo eq '17'">selected = "selected"</if> >卷帘开</option>
											<option  value="18" <if condition="$vo eq '18'">selected = "selected"</if> >卷帘关</option>
											<option  value="19" <if condition="$vo eq '19'">selected = "selected"</if> >滑帘开</option>
											<option  value="20" <if condition="$vo eq '20'">selected = "selected"</if> >滑帘关</option>
											<option  value="21" <if condition="$vo eq '21'">selected = "selected"</if> >照明</option>
											<option  value="22" <if condition="$vo eq '22'">selected = "selected"</if> >告警</option>

										</select>
										<p class="help-block"></p>
									</div>
									<div class="col-lg-1 col-md-1 col-sm-1"></div>

							<if condition="$k%3 eq 2 or $k eq 15">
								</div>
							</if>
							</foreach>
							

							<!-- <div class="form-group">
								<div class="col-lg-8">
									<button onclick="readNM410para();" type="button" class="btn btn-info">读取参数</button>
									  <button onclick="writeNM410para();" type="button" class="btn btn-danger">设置参数</button>
									<button onclick="save410sysvar();" type="button" class="btn btn-info">保存</button>
								</div>
							</div> -->
						</div>
					</section>
					
					<section class="panel" id="sec_temp">
					  <header class="panel-heading">
						  温度曲线       
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">日龄</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">目标温度</label>
							</div>
							
							<foreach name="tempFig_Day_array" item="vo" key="k">
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="tempFig_Day{$k+1}" placeholder="" value="{$tempFig_Day_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="tempFig_Target{$k+1}" placeholder="" value="{$tempFig_Target_array[$k]}">
									<p class="help-block"></p>
								</div>
							</div>
							</foreach>

							
							<!-- <div class="form-group">
								<div class="col-lg-8">
									<button onclick="readNM410para();" type="button" class="btn btn-info">读取参数</button>
									  <button onclick="writeNM410para();" type="button" class="btn btn-danger">设置参数</button>
									<button onclick="save410tempFig();" type="button" class="btn btn-info">保存</button>
								</div>
							</div> -->
						</div>
					</section>
					
					<section class="panel" id="sec_cool">
					  <header class="panel-heading">
						  制冷    
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">日龄</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">制冷启动时刻</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">制冷停止时刻</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">制冷启动温度</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">制冷停止湿度</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">制冷工作时间</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">制冷结束时间</label>
							</div>
							<foreach name="cool_STime_array" item="vo" key="k">
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="cool_Day{$k+1}" placeholder="" value="{$cool_Day_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="cool_STime{$k+1}" placeholder="" value="{$cool_STime_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="cool_ETime{$k+1}" placeholder="" value="{$cool_ETime_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="cool_STemp{$k+1}" placeholder="" value="{$cool_STemp_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="cool_EHumi{$k+1}" placeholder="" value="{$cool_EHumi_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="cool_On{$k+1}" placeholder="" value="{$cool_On_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="cool_Off{$k+1}" placeholder="" value="{$cool_Off_array[$k]}">
									<p class="help-block"></p>
								</div>
							</div>
							</foreach>
							
							<!-- <div class="form-group">
								<div class="col-lg-8">
									<button onclick="readNM410para();" type="button" class="btn btn-info">读取参数</button>
									  <button onclick="writeNM410para();" type="button" class="btn btn-danger">设置参数</button>
									<button onclick="save410cool();" type="button" class="btn btn-info">保存</button>
								</div>
							</div> -->
							
							
						</div>
					</section>
					
					
					<section class="panel" id="sec_heat">
					  <header class="panel-heading">
						  加热      
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">加热开始时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">加热结束时间</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">加热开始温度</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">加热结束温度</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">开分钟</label>
								<label for="input2" class="col-lg-2 col-md-2 col-sm-2 control-label">关分钟</label>
							</div>
							
							<foreach name="heat_STime_array" item="vo" key="k">
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="heat_STime{$k+1}" placeholder="" value="{$heat_STime_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="heat_ETime{$k+1}" placeholder="" value="{$heat_ETime_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="heat_STemp{$k+1}" placeholder="" value="{$heat_STemp_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="heat_ETemp{$k+1}" placeholder="" value="{$heat_ETemp_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="heat_On{$k+1}" placeholder="" value="{$heat_On_array[$k]}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-2 col-md-2 col-sm-2">
									<input type="text" class="form-control touchspin1" name="heat_Off{$k+1}" placeholder="" value="{$heat_Off_array[$k]}">
									<p class="help-block"></p>
								</div>
							</div>
							</foreach>

							<!-- <div class="form-group">
								<div class="col-lg-8">
									<button onclick="readNM410para();" type="button" class="btn btn-info">读取参数</button>
									  <button onclick="writeNM410para();" type="button" class="btn btn-danger">设置参数</button>
									<button onclick="save410heat();" type="button" class="btn btn-info">保存</button>
								</div>
							</div> -->
						</div>
					</section>
					
					
					<section class="panel" id="sec_light">
					  <header class="panel-heading">
						  光照
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">可调光照开始时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">可调光照结束时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">可调光照强度</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">光照1开始时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">光照1结束时间</label>
							</div>
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime1" placeholder="" value="{$nm410tableModel['light_STime1']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime1" placeholder="" value="{$nm410tableModel['light_ETime1']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_Level1" placeholder="" value="{$nm410tableModel['light_Level1']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime11" placeholder="" value="{$nm410tableModel['light_STime11']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime11" placeholder="" value="{$nm410tableModel['light_ETime11']}">
									<p class="help-block"></p>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime2" placeholder="" value="{$nm410tableModel['light_STime2']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime2" placeholder="" value="{$nm410tableModel['light_ETime2']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_Level2" placeholder="" value="{$nm410tableModel['light_Level2']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime12" placeholder="" value="{$nm410tableModel['light_STime12']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime12" placeholder="" value="{$nm410tableModel['light_ETime12']}">
									<p class="help-block"></p>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime3" placeholder="" value="{$nm410tableModel['light_STime3']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime3" placeholder="" value="{$nm410tableModel['light_ETime3']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_Level3" placeholder="" value="{$nm410tableModel['light_Level3']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime13" placeholder="" value="{$nm410tableModel['light_STime13']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime13" placeholder="" value="{$nm410tableModel['light_ETime13']}">
									<p class="help-block"></p>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime4" placeholder="" value="{$nm410tableModel['light_STime4']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime4" placeholder="" value="{$nm410tableModel['light_ETime4']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_Level4" placeholder="" value="{$nm410tableModel['light_Level4']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime14" placeholder="" value="{$nm410tableModel['light_STime14']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime14" placeholder="" value="{$nm410tableModel['light_ETime14']}">
									<p class="help-block"></p>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime5" placeholder="" value="{$nm410tableModel['light_STime5']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime5" placeholder="" value="{$nm410tableModel['light_ETime5']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_Level5" placeholder="" value="{$nm410tableModel['light_Level5']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_STime15" placeholder="" value="{$nm410tableModel['light_STime15']}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control" name="light_ETime15" placeholder="" value="{$nm410tableModel['light_ETime15']}">
									<p class="help-block"></p>
								</div>
							</div>
						</div>
					</section>
					
					<section class="panel" id="sec_wind">
					  <header class="panel-heading">
						  通风级别       
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label"></label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">开时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">关时间</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温差</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">侧风窗</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">卷帘</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">变速风机</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">天花窗</label>
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">滑帘</label>
								<!-- <label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">风机</label> -->
							</div>
							<hr style="height:1px;border:none;border-top:1px dashed #00A8B3;" />
							
							<foreach name="tongfen" item="vo" key="k">
							<div class="row">
								<div>
									<label for="input2" id="id-level-{$vo.index}" class="col-lg-1 col-md-1 col-sm-1 control-label">级别{$vo.index}</label>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm" name="wind_On{$vo.index}" placeholder="" value="{$vo.wind_On}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm" name="wind_Off{$vo.index}" placeholder="" value="{$vo.wind_Off}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="wind_dTemp{$vo.index}" placeholder="" value="{$vo.wind_dTemp}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin2" name="wind_Side{$vo.index}" placeholder="" value="{$vo.wind_Side}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin2" name="wind_Roller{$vo.index}" placeholder="" value="{$vo.wind_Roller}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin2" name="wind_VSFan{$vo.index}" placeholder="" value="{$vo.wind_VSFan}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin2" name="wind_Top{$vo.index}" placeholder="" value="{$vo.wind_Top}">
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin2" name="wind_Slide{$vo.index}" placeholder="" value="{$vo.wind_Slide}">
									<p class="help-block"></p>
								</div>
								<!-- <div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm" name="wind_Fan{$vo.index}" placeholder="" value="{$vo.wind_Fan}">
									<p class="help-block"></p>
								</div> -->
							</div>
							<div class="row">
								<div>
									<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">风机1-8</label>
								</div >
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan1_{$vo.index}' value="{$vo.wind_Fan1}" >
										<option  value="00" <if condition="$vo.wind_Fan1 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan1 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan1 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan1 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan2_{$vo.index}' value="{$vo.wind_Fan2}" >
										<option  value="00" <if condition="$vo.wind_Fan2 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan2 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan2 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan2 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan3_{$vo.index}' value="{$vo.wind_Fan3}" >
										<option  value="00" <if condition="$vo.wind_Fan3 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan3 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan3 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan3 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan4_{$vo.index}' value="{$vo.wind_Fan4}" >
										<option  value="00" <if condition="$vo.wind_Fan4 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan4 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan4 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan4 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan5_{$vo.index}' value="{$vo.wind_Fan5}" >
										<option  value="00" <if condition="$vo.wind_Fan5 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan5 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan5 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan5 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan6_{$vo.index}' value="{$vo.wind_Fan6}" >
										<option  value="00" <if condition="$vo.wind_Fan6 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan6 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan6 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan6 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan7_{$vo.index}' value="{$vo.wind_Fan7}" >
										<option  value="00" <if condition="$vo.wind_Fan7 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan7 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan7 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan7 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<select class="form-control input-sm" name='wind_Fan8_{$vo.index}' value="{$vo.wind_Fan8}" >
										<option  value="00" <if condition="$vo.wind_Fan8 eq '00'">selected = "selected"</if> >关闭</option>
										<option  value="01" <if condition="$vo.wind_Fan8 eq '01'">selected = "selected"</if> >常开</option>
										<option  value="10" <if condition="$vo.wind_Fan8 eq '10'">selected = "selected"</if> >周期</option>
										<option  value="11" <if condition="$vo.wind_Fan8 eq '11'">selected = "selected"</if> >轮流</option>
									</select>
									<p class="help-block"></p>
								</div>
							</div>
							<hr style="height:1px;border:none;border-top:1px dashed #00A8B3;" />
							</foreach>
						</div>
					</section>
					
					<section class="panel" id="sec_cal">
					  <header class="panel-heading">
						  校准      
					  </header>
						<div class="panel-body">
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">温度校准值</label>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="cal_dTemp1" placeholder="" value="{$nm410Model['cal_dTemp1']}">
									<p class="help-block">
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="cal_dTemp2" placeholder="" value="{$nm410Model['cal_dTemp2']}">
									<p class="help-block">
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="cal_dTemp3" placeholder="" value="{$nm410Model['cal_dTemp3']}">
									<p class="help-block">
								</div>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="cal_dTemp4" placeholder="" value="{$nm410Model['cal_dTemp4']}">
									<p class="help-block">
								</div>
							</div>
							
							<div class="row">
								<label for="input2" class="col-lg-1 col-md-1 col-sm-1 control-label">湿度校准值</label>
								<div class="col-lg-1 col-md-1 col-sm-1">
									<input type="text" class="form-control input-sm touchspin1" name="cal_dHumi1" placeholder="" value="{$nm410Model['cal_dHumi1']}">
									<p class="help-block">
								</div>
							</div>
						</div>
					</section>

				</form>
			</div>
		</div>
	
	</div>
	

	<div id="menu">
		<ul>
			<li><a href="#sec_mh">数量统计</a></li>
			<li><a href="#sec_net">通讯设置</a></li>
			<li><a href="#sec_mode">设置模式</a></li>
			<li><a href="#sec_channel">隧道设置</a></li>
			<li><a href="#sec_sensor">传感器设置</a></li>
			<li><a href="#sec_sys">系统变量</a></li>
			<li><a href="#sec_temp">温度曲线</a></li>
			<li><a href="#sec_cool">制冷</a></li>
			<li><a href="#sec_heat">加热</a></li>
			<li><a href="#sec_light">光照</a></li>
			<li><a href="#sec_wind">通风级别</a></li>
			<li><a href="#sec_cal">校准</a></li>
		</ul>
	</div>
	
	

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="__PUBLIC__/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="__PUBLIC__/js/jquery.scrollTo.min.js"></script>
    <script src="__PUBLIC__/js/jquery.nicescroll.js" type="text/javascript"></script>
	<!-- SlimScroll -->
	<script src="__PUBLIC__/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script src="__PUBLIC__/js/jquery.sparkline.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
    <script src="__PUBLIC__/js/owl.carousel.js" ></script>
    <script src="__PUBLIC__/js/jquery.customSelect.min.js" ></script>
	<script src="__PUBLIC__/assets/morris.js-0.4.3/morris.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/morris.js-0.4.3/raphael-min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/respond.min.js" ></script>

    <!--right slidebar-->
    <script src="__PUBLIC__/js/slidebars.min.js"></script>

    <!--common script for all pages-->
    <script src="__PUBLIC__/js/common-scripts.js"></script>

	<!--this page plugins-->
	<script type="text/javascript" src="__PUBLIC__/assets/fuelux/js/spinner.min.js"></script>
	
	<!-- iCheck 1.0.1 -->
	<script src="__PUBLIC__/plugins/iCheck/icheck.min.js"></script>
	<!-- TouchSpin -->
    <script src="__PUBLIC__/plugins/touchspin/jquery.bootstrap-touchspin.min.js"></script>

	<!--custom switch-->
	<script src="__PUBLIC__/js/bootstrap-switch.js"></script>
	<!--custom tagsinput-->
	<script src="__PUBLIC__/js/jquery.tagsinput.js"></script>
	<!--custom checkbox & radio-->
	<script type="text/javascript" src="__PUBLIC__/js/ga.js"></script>
	
	<!-- layer -->
	<script src="__PUBLIC__/plugins/layer-v3.0.1/layer/layer.js"></script>
	
	<script type="text/javascript" src="__PUBLIC__/plugins/floatmenu/js/menu.js"></script>

    <script>
		function save410(){
			layer.load();
			$.ajax({
				  type: 'POST',
				  url:"{:u('Setting/save410')}"+"?rid={$nm410Model['rid']}&code="+$("input[name='code']").val(),
				  data: $("#id-form-system").serialize(),
				  success: function(msg){
					if(msg>=0){
						layer.open({
							title: '修改成功'
							, content: '修改成功'
						});
					}else{
						layer.open({
							title: '修改失败'
							, content: '修改失败'
						});
					}
				  },
				  complete: function(XMLHttpRequest, textStatus) { 
					layer.closeAll('loading');
				  },
				  dataType: "text"
			});
	    }
		
		function readNM410clock(){
			layer.load();
			$.ajax({
				  type: 'get',
				  url:"{:u('Setting/readNM410clock')}"+"?rid={$nm410Model['rid']}&code="+$("input[name='code']").val(),
				  data: {},
				  success: function(msg){
					layer.closeAll('loading');
					if(msg){
						layer.open({
						  title: ''
						  ,content: msg.message
						}); 
					}else{
						
					}
				  },
				  error: function(XMLHttpRequest, textStatus, errorThrown) {
					//alert(XMLHttpRequest.status);
					//alert(XMLHttpRequest.readyState);
					//alert(textStatus);
					console.info(XMLHttpRequest);
					console.info(textStatus);
					console.info(errorThrown);
					if(textStatus.toLowerCase()=='parsererror'){
						layer.open({
							title: '错误'
							, content: XMLHttpRequest.responseText
						});
					}
				  },
				  dataType: "json"
			});
		}
	  
		function writeNM410clock(){
			layer.load();
			$.ajax({
				  type: 'get',
				  url:"{:u('Setting/writeNM410clock')}"+"?rid={$nm410Model['rid']}&code="+$("input[name='code']").val(),
				  data: {},
				  success: function(msg){
					layer.closeAll('loading');
					if(msg){
						if(msg.message=="OK"){
							layer.open({
							  title: '设置成功'
							  ,content: '设置成功'
							}); 
						}else{
							layer.open({
							  title: ''
							  ,content: msg.message
							}); 
						}
					}
				  },
				  error: function(XMLHttpRequest, textStatus, errorThrown) {
						layer.closeAll('loading');
						//alert('提交失败'+XMLHttpRequest.status);
						layer.open({
						  title: '错误'
						  ,content: XMLHttpRequest.status
						});
				  },
				  dataType: "json"
			});
		}
		
		
		function prefixInteger(num, n) {
            return (Array(n).join(0) + num).slice(-n);
        }
		
		function readNM410para(){
			layer.load();
			$.ajax({
				  type: 'POST',
				  url:"{:u('Setting/readNM410para')}"+"?rid={$nm410Model['rid']}&code="+$("input[name='code']").val(),
				  data: '',
				  success: function(msg){
					layer.closeAll('loading');
					console.info(msg);
					var t_level=null;
					//模式
					$("select[name='sys_Mode']").val(msg.sys_Mode);
					
					//统计
					$("input[name='mh_Day']").val(msg.mh_Day);
					$("input[name='mh_DeadTotal']").val(msg.mh_DeadTotal);
					//$("input[name='mh_SerNum']").val(msg.mh_SerNum);
					$("input[name='mh_InitNum']").val(msg.mh_InitNum);
					$("input[name='mh_RevNum']").val(msg.mh_RevNum);
					//通讯设置
					$("input[name='serverIP']").val(msg.serverIP);
					$("input[name='serverPort']").val(msg.serverPort);
					$("input[name='localIP']").val(msg.localIP);
					$("input[name='gateway']").val(msg.gateway);
					$("input[name='netmask']").val(msg.netmask);
					//隧道设置
					$("input[name='tunnel_Temp']").val(msg.tunnel_Temp);
					$("input[name='sys_Level_StartChannel']").val(msg.sys_Level_StartChannel);
					t_level=parseInt(msg.sys_Level_StartChannel);
					for(var i=t_level;i<=20;i++){
						$("#id-level-"+i).html("<span style='color:#00ff00'>(隧道)</span>级别"+i);
					}
					$("input[name='sys_Time_Channel']").val(msg.sys_Time_Channel);
					
					//传感器设置
					var sensor_Wind=parseInt(msg.sensor_Wind).toString(2);
					sensor_Wind=prefixInteger(sensor_Wind,8).split("").reverse().join("");
					for(var i=0;i<sensor_Wind.length;i++){
						//$("input[name='sensor_Wind"+(i+1)+"']").val(sensor_Wind[i]);
						var status=(sensor_Wind[i]==='1'?'check':'uncheck');
						$("input[name='sensor_Wind"+(i+1)+"']").iCheck(status);
					}
					var sensor_Channel=parseInt(msg.sensor_Channel).toString(2);
					sensor_Channel=prefixInteger(sensor_Channel,8).split("").reverse().join("");
					for(var i=0;i<sensor_Channel.length;i++){
						//$("input[name='sensor_Channel"+(i+1)+"']").val(sensor_Channel[i]);
						var status=(sensor_Channel[i]=='1'?'check':'uncheck');
						$("input[name='sensor_Channel"+(i+1)+"']").iCheck(status);
					}
					
					var sensor_Cool=parseInt(msg.sensor_Cool).toString(2);
					sensor_Cool=prefixInteger(sensor_Cool,8).split("").reverse().join("");
					for(var i=0;i<sensor_Cool.length;i++){
						//$("input[name='sensor_Cool"+(i+1)+"']").val(sensor_Cool[i]);
						var status=(sensor_Cool[i]=='1'?'check':'uncheck');
						$("input[name='sensor_Cool"+(i+1)+"']").iCheck(status);
					}

					
					var sensor_Heat=msg.sensor_Heat;
					for(var i=0;i<sensor_Heat.length;i++){
						var tem=sensor_Heat[i];
						var t=parseInt(tem).toString(2);
						t=prefixInteger(t,8).split("").reverse().join("");
						for(var j=0;j<t.length;j++){
							//$("input[name='sensor_Heat"+(i+1).toString()+(j+1).toString()+"']").val(t[j]);
							
							var status=(t[j]=='1'?'check':'uncheck');
							$("input[name='sensor_Heat"+(i+1).toString()+(j+1).toString()+"']").iCheck(status);
						}
					}

					//系统变量
					$("input[name='sys_Delay_FanUp']").val(msg.sys_Delay_FanUp);
					$("input[name='sys_Delay_FanDown']").val(msg.sys_Delay_FanDown);
	
					var sys_Time_Pos_ON=msg.sys_Time_Pos_ON;
					for(var i=0;i<sys_Time_Pos_ON.length;i++){
						$("input[name='sys_Time_Pos_ON"+(i+1)+"']").val(sys_Time_Pos_ON[i]);
					}
					
					var sys_Time_Pos_OFF=msg.sys_Time_Pos_OFF;
					for(var i=0;i<sys_Time_Pos_OFF.length;i++){
						$("input[name='sys_Time_Pos_OFF"+(i+1)+"']").val(sys_Time_Pos_OFF[i]);
					}
					
					var sys_Alarm_TempSF=msg.sys_Alarm_TempSF;
					for(var i=0;i<sys_Alarm_TempSF.length;i++){
						$("select[name='sys_Alarm_TempSF"+(i+1)+"']").val(sys_Alarm_TempSF[i]);
					}
					
					var sys_Alarm_HumiSF=msg.sys_Alarm_HumiSF;
					for(var i=0;i<sys_Alarm_HumiSF.length;i++){
						$("select[name='sys_Alarm_HumiSF"+(i+1)+"']").val(sys_Alarm_HumiSF[i]);
					}
					
					$("select[name='sys_EnHumi']").val(msg.sys_EnHumi);
					$("input[name='sys_Alarm_Temp_Max']").val(msg.sys_Alarm_Temp_Max);
					$("input[name='sys_Alarm_Temp_Min']").val(msg.sys_Alarm_Temp_Min);
					$("input[name='sys_Alarm_Humi_Max']").val(msg.sys_Alarm_Humi_Max);
					$("input[name='sys_Alarm_Humi_Min']").val(msg.sys_Alarm_Humi_Min);
					$("input[name='sys_Password']").val(msg.sys_Password);
					var sys_Relay=msg.sys_Relay;
					for(var i=0;i<sys_Relay.length;i++){
						$("select[name='sys_Relay"+(i+1)+"']").val(sys_Relay[i]);
					}
					
					
					//温度曲线
					var tempFig_Day=msg.tempFig_Day;
					for(var i=0;i<tempFig_Day.length;i++){
						$("input[name='tempFig_Day"+(i+1)+"']").val(tempFig_Day[i]);
					}
					
					var tempFig_Target=msg.tempFig_Target;
					for(var i=0;i<tempFig_Target.length;i++){
						$("input[name='tempFig_Target"+(i+1)+"']").val(tempFig_Target[i]);
					}
					
					//制冷--曲线
					
					var cool_Day=msg.cool_Day;
					for(var i=0;i<cool_Day.length;i++){
						$("input[name='cool_Day"+(i+1)+"']").val(cool_Day[i]);
					}
					
					var cool_STime=msg.cool_STime;
					for(var i=0;i<cool_STime.length;i++){
						$("input[name='cool_STime"+(i+1)+"']").val(cool_STime[i]);
					}
					
					var cool_ETime=msg.cool_ETime;
					for(var i=0;i<cool_ETime.length;i++){
						$("input[name='cool_ETime"+(i+1)+"']").val(cool_ETime[i]);
					}
					
					var cool_STemp=msg.cool_STemp;
					for(var i=0;i<cool_STemp.length;i++){
						$("input[name='cool_STemp"+(i+1)+"']").val(cool_STemp[i]);
					}
					
					var cool_EHumi=msg.cool_EHumi;
					for(var i=0;i<cool_EHumi.length;i++){
						$("input[name='cool_EHumi"+(i+1)+"']").val(cool_EHumi[i]);
					}
					
					var cool_On=msg.cool_On;
					for(var i=0;i<cool_On.length;i++){
						$("input[name='cool_On"+(i+1)+"']").val(cool_On[i]);
					}
					
					var cool_Off=msg.cool_Off;
					for(var i=0;i<cool_Off.length;i++){
						$("input[name='cool_Off"+(i+1)+"']").val(cool_Off[i]);
					}

					
					//加热
					var heat_STime=msg.heat_STime;
					for(var i=0;i<heat_STime.length;i++){
						$("input[name='heat_STime"+(i+1)+"']").val(heat_STime[i]);
					}
					
					var heat_ETime=msg.heat_ETime;
					for(var i=0;i<heat_ETime.length;i++){
						$("input[name='heat_ETime"+(i+1)+"']").val(heat_ETime[i]);
					}
					
					var heat_STemp=msg.heat_STemp;
					for(var i=0;i<heat_STemp.length;i++){
						$("input[name='heat_STemp"+(i+1)+"']").val(heat_STemp[i]);
					}
					
					var heat_ETemp=msg.heat_ETemp;
					for(var i=0;i<heat_ETemp.length;i++){
						$("input[name='heat_ETemp"+(i+1)+"']").val(heat_ETemp[i]);
					}
					
					var heat_On=msg.heat_On;
					for(var i=0;i<heat_On.length;i++){
						$("input[name='heat_On"+(i+1)+"']").val(heat_On[i]);
					}
					
					var heat_Off=msg.heat_Off;
					for(var i=0;i<heat_Off.length;i++){
						$("input[name='heat_Off"+(i+1)+"']").val(heat_Off[i]);
					}
					
					//光照
					var light_STime=msg.light_STime;
					for(var i=0;i<light_STime.length;i++){
						$("input[name='light_STime"+(i+1)+"']").val(light_STime[i]);
					}
					
					var light_ETime=msg.light_ETime;
					for(var i=0;i<light_ETime.length;i++){
						$("input[name='light_ETime"+(i+1)+"']").val(light_ETime[i]);
					}
					
					var light_Level=msg.light_Level;
					for(var i=0;i<light_Level.length;i++){
						$("input[name='light_Level"+(i+1)+"']").val(light_Level[i]);
					}
					
					var light_STime1=msg.light_STime1;
					for(var i=0;i<light_STime1.length;i++){
						$("input[name='light_STime1"+(i+1)+"']").val(light_STime1[i]);
					}
					
					var light_ETime1=msg.light_ETime1;
					for(var i=0;i<light_ETime1.length;i++){
						$("input[name='light_ETime1"+(i+1)+"']").val(light_ETime1[i]);
					}
					
					
					//通风级别
					var wind_On=msg.wind_On;
					for(var i=0;i<wind_On.length;i++){
						$("input[name='wind_On"+(i+1)+"']").val(wind_On[i]);
					}
					
					var wind_Off=msg.wind_Off;
					for(var i=0;i<wind_Off.length;i++){
						$("input[name='wind_Off"+(i+1)+"']").val(wind_Off[i]);
					}
					
					var wind_dTemp=msg.wind_dTemp;
					for(var i=0;i<wind_dTemp.length;i++){
						$("input[name='wind_dTemp"+(i+1)+"']").val(wind_dTemp[i]);
					}
					
					var wind_Side=msg.wind_Side;
					for(var i=0;i<wind_Side.length;i++){
						$("input[name='wind_Side"+(i+1)+"']").val(wind_Side[i]);
					}
					
					var wind_Roller=msg.wind_Roller;
					for(var i=0;i<wind_Roller.length;i++){
						$("input[name='wind_Roller"+(i+1)+"']").val(wind_Roller[i]);
					}
					
					var wind_VSFan=msg.wind_VSFan;
					for(var i=0;i<wind_VSFan.length;i++){
						$("input[name='wind_VSFan"+(i+1)+"']").val(wind_VSFan[i]);
					}
					
					var wind_Top=msg.wind_Top;
					for(var i=0;i<wind_Top.length;i++){
						$("input[name='wind_Top"+(i+1)+"']").val(wind_Top[i]);
					}
					
					var wind_Slide=msg.wind_Slide;
					for(var i=0;i<wind_Slide.length;i++){
						$("input[name='wind_Slide"+(i+1)+"']").val(wind_Slide[i]);
					}
					
					var wind_Fan=msg.wind_Fan;
					//console.info(wind_Fan);
					for(var i=0;i<wind_Fan.length;i++){
						//$("input[name='wind_Fan"+(i+1)+"']").val(wind_Fan[i]);
						var wind_Fan_dec=wind_Fan[i];
						var wind_Fan_bin=parseInt(wind_Fan_dec).toString(2);
						wind_Fan_bin=prefixInteger(wind_Fan_bin,16);
						//console.info(wind_Fan_bin);
						for(var j=7;j>=0;j--){
							//var t=I("wind_Fan".(j)."_".(i+1));
							$("select[name='wind_Fan"+(8-j).toString()+"_"+(i+1).toString()+"']").val(wind_Fan_bin.substr(j*2,2));
							//console.info("wind_Fan"+(16-j).toString()+"_"+(i+1).toString()+"'");console.info(wind_Fan_bin.substr(j*2,2));
						}
					}
					
					
					//校准
					var cal_dTemp=msg.cal_dTemp;
					for(var i=0;i<cal_dTemp.length;i++){
						$("input[name='cal_dTemp"+(i+1)+"']").val(cal_dTemp[i]);
					}
					
					var cal_dHumi=msg.cal_dHumi;
					for(var i=0;i<cal_dHumi.length;i++){
						$("input[name='cal_dHumi"+(i+1)+"']").val(cal_dHumi[i]);
					}
					
					layer.open({
						title: '读取成功'
						, content: '读取成功'
					});
						
					
				  },
				  error: function(XMLHttpRequest, textStatus, errorThrown) {
					//alert(XMLHttpRequest.status);
					//alert(XMLHttpRequest.readyState);
					//alert(textStatus);
					console.info(XMLHttpRequest);
					console.info(textStatus);
					console.info(errorThrown);
					if(textStatus.toLowerCase()=='parsererror'){
						layer.open({
							title: '错误'
							, content: XMLHttpRequest.responseText
						});
					}
				  },
				  complete: function(XMLHttpRequest, textStatus) { 
					layer.closeAll('loading');
				  },
				  dataType: "json"
			});
		}
	  
		function writeNM410para(){
			layer.load();
			$.ajax({
				  type: 'POST',
				  url:"{:u('Setting/writeNM410para')}"+"?rid={$nm410Model['rid']}&code="+$("input[name='code']").val(),
				  data: $("#id-form-system").serialize(),
				  success: function(msg){
					layer.closeAll('loading');
					if(msg){
						if(msg.message=="OK"){
							layer.open({
								title: '成功'
								, content: '设置成功'
							});
						}else{
							layer.open({
							  title: ''
							  ,content: msg.message
							}); 
						}
					}
				  },
				  complete: function(XMLHttpRequest, textStatus) { 
					layer.closeAll('loading');
				  },
				  dataType: "json"
			});
		}
		
		$.fn.serializeObject = function () {
			var o = {};
			var a = this.serializeArray();
			$.each(a, function () {
				if (o[this.name] !== undefined) {
					if (!o[this.name].push) {
						o[this.name] = [o[this.name]];
					}
					o[this.name].push(this.value || '');
				} else {
					o[this.name] = this.value || '';
				}
			});
			var $radio = $('input[type=radio],input[type=checkbox]',this);
			$.each($radio,function(){
				if(!o.hasOwnProperty(this.name)){
					o[this.name] = '';
				}
			});
			return o;
		};
		
		
		function initScroll(){
			var h=$(window).height();
			//出现滚动条
			$(".mybar").slimScroll({
				height:(h-10),
				size: '10px', //组件宽度
				color: '#000', //滚动条颜色
				position: 'right', //组件位置：left/right
				distance: '0px', //组件与侧边之间的距离
				start: 'top', //默认滚动位置：top/bottom
				opacity: .9, //滚动条透明度
				alwaysVisible: true, //是否 始终显示组件
				disableFadeOut: false, //是否 鼠标经过可滚动区域时显示组件，离开时隐藏组件
				railVisible: true, //是否 显示轨道
				railColor: '#333', //轨道颜色
				railOpacity: .2, //轨道透明度
				railDraggable: true, //是否 滚动条可拖动
				railClass: 'slimScrollRail', //轨道div类名 
				barClass: 'slimScrollBar', //滚动条div类名
				wrapperClass: 'slimScrollDiv', //外包div类名
				allowPageScroll: true, //是否 使用滚轮到达顶端/底端时，滚动窗口
				wheelStep: 20, //滚轮滚动量
				touchScrollStep: 200, //滚动量当用户使用手势
				borderRadius: '7px', //滚动条圆角
				railBorderRadius: '7px' //轨道圆角
			});
		}
		  
	    $(window).resize(function(){
		    initScroll();
	    });
	  
		$(document).ready(function () {
			initScroll();
			
			$('input').on('ifChecked', function(event){
			  //console.info(this);
			  this.value='1';
			});
			
			$('input').on('ifUnchecked', function(event){
			  //alert(event.type + ' callback');
			  this.value='0';
			});

			$('input[type="checkbox"], input[type="radio"]').iCheck({
			  checkboxClass: 'icheckbox_minimal-blue',
			  radioClass: 'iradio_minimal-blue'
			});
			
			$('input[value="1"]').iCheck('check');
			$('input[value="0"]').iCheck('uncheck');
			
			//一位小数
			$(".touchspin1").TouchSpin({
				min: 0,
                max: 100,
				decimals: 1,
				step: 0.1,
                buttondown_class: 'btn btn-white',
                buttonup_class: 'btn btn-white'
            });

			//无小数+%
            $(".touchspin2").TouchSpin({
                min: 0,
                max: 100,
                step: 1,
                //decimals: 2,
                boostat: 5,
                maxboostedstep: 10,
                postfix: '%',
                buttondown_class: 'btn btn-white',
                buttonup_class: 'btn btn-white'
            });

			//无小数
            $(".touchspin3").TouchSpin({
                min: 0,
                max: 1000,
				step: 1,
                buttondown_class: 'btn btn-white',
                buttonup_class: 'btn btn-white'
            });
			
		});
    </script>

  </body>
</html>
